{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "6189f9e8-fd50-44b9-9fa6-f54ccbd2caa2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "qwen-turbo\n",
      "qwen-plus\n",
      "qwen-max\n",
      "qwen-max-0403\n",
      "qwen-max-0107\n",
      "qwen-max-1201\n",
      "qwen-max-longcontext\n",
      "qwen1.5-72b-chat\n",
      "qwen1.5-32b-chat\n",
      "qwen1.5-14b-chat\n",
      "qqwen1.5-7b-chat\n",
      "qwen1.5-1.8b-chat\n",
      "qwen1.5-0.5b-chat\n",
      "codeqwen1.5-7b-chat\n",
      "qwen-72b-chat\n",
      "qwen-14b-chat\n",
      "qwen-7b-chat\n",
      "qwen-1.8b-longcontext-chat\n",
      "qwen-1.8b-chat\n",
      "qwen1.5-110b-chat\n",
      "qwen-max-0428\n",
      "qwen-vl-plus\n",
      "qwen-vl-max\n",
      "qwen-long\n",
      "qwen2-72b-instruct\n",
      "qwen2-7b-instruct\n",
      "qwen2-0.5b-instruct\n",
      "qwen2-1.5b-instruct\n",
      "qwen2-57b-a14b-instruct\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "from dotenv import load_dotenv, find_dotenv\n",
    "from openai import OpenAI\n",
    "load_dotenv()\n",
    "client = OpenAI(\n",
    "    api_key=os.getenv(\"API_KEY\"), # 如果您没有配置环境变量，请在此处用您的API Key进行替换\n",
    "    base_url=\"https://dashscope.aliyuncs.com/compatible-mode/v1\",  # 填写DashScope服务的base_url\n",
    ")\n",
    "\n",
    "model_list = client.models.list()\n",
    "for model in model_list:\n",
    "    print(model.id)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "5263221d-1619-4374-a6dc-d1a29e7e69fb",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_openai import ChatOpenAI\n",
    "\n",
    "llm = ChatOpenAI(\n",
    "    model=\"qwen-72b-chat\",\n",
    "    api_key=os.getenv(\"API_KEY\"), # 如果您没有配置环境变量，请在此处用您的API Key进行替换\n",
    "    base_url=\"https://dashscope.aliyuncs.com/compatible-mode/v1\",  # 填写DashScope服务的base_url\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "9813ff1f-b674-4453-b92d-0d2dfa88c1c6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "AIMessage(content='I\\'m sorry, but I couldn\\'t find any widely recognized or well-established model named \"Sora Model\" in my knowledge database. It\\'s possible that you might be referring to a specific model, technology, or concept that is not yet popular or well-documented.\\n\\nIf you could provide more context or details about where you heard about the Sora Model, it would help me give you a more accurate answer. Alternatively, if you meant \"SORA (Software-Defined Radio Access Network)\" which is a technology related to wireless communication, then it refers to an approach for designing and implementing radio access networks using software-defined radio technologies. This allows for greater flexibility and adaptability in managing wireless networks compared to traditional hardware-centric approaches.', response_metadata={'token_usage': {'completion_tokens': 146, 'prompt_tokens': 6, 'total_tokens': 152}, 'model_name': 'qwen-72b-chat', 'system_fingerprint': None, 'finish_reason': 'stop', 'logprobs': None}, id='run-b7ad50a5-75d4-4427-8333-25fea0bf852b-0', usage_metadata={'input_tokens': 6, 'output_tokens': 146, 'total_tokens': 152})"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "llm.invoke(\"what the sora model?\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "eeef2c3e-abca-4905-b88d-5e6cc6c8e1c8",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_core.prompts import ChatPromptTemplate\n",
    "from langchain_core.output_parsers import StrOutputParser\n",
    "prompt = ChatPromptTemplate([\n",
    "    (\"system\",\"you are the technical writer\"),\n",
    "    (\"human\",\"{input}\")\n",
    "])\n",
    "\n",
    "output_parser = StrOutputParser()  # 输出string\n",
    "chain = prompt | llm | output_parser\n",
    "#chain.invoke({\"input\",\"what the JavaSpring?\"})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "53a2fadc-dd32-4d61-99b2-1d2708737bd0",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0.2.14\n"
     ]
    }
   ],
   "source": [
    "import langchain\n",
    "print(langchain.__version__)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "ab9b5fe6-2e55-4083-9099-05b5270fe762",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_community.document_loaders import WebBaseLoader\n",
    "\n",
    "import os\n",
    "loader = WebBaseLoader(\"https://openai.com/research/video-generation-models-as-world-simulators\")\n",
    "docs = loader.load()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "b6875613-46d9-4f6c-91e0-30ef330324fa",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[-0.6415116786956787, 4.466091632843018, -3.238172769546509, -2.249798536300659, -0.3632270097732544, 1.7135069370269775, -1.1533101797103882, -1.4367785453796387, -0.6035597324371338, -0.1321750283241272, 0.1108025461435318, 1.0497030019760132, 1.0655517578125, -0.6130354404449463, 0.1195102259516716, -1.2772012948989868, 0.5635545253753662, -3.6184353828430176, 0.1352810263633728, 1.3983832597732544, -0.7143080234527588, -0.2858479917049408, 0.8335028886795044, 1.2005479335784912, -0.7494744062423706, -2.3752169609069824, -1.6479153633117676, 2.276360511779785, -0.4266526997089386, 0.49207961559295654, -0.1368204802274704, -0.1780632883310318, 0.1585523784160614, 1.9580349922180176, 0.75750732421875, -0.2281629741191864, -0.8200666904449463, 1.639404296875, 0.5922605991363525, 0.7393730878829956, 2.346906900405884, 0.46493783593177795, 2.5875651836395264, 1.2654588222503662, -0.7268744707107544, -1.5860121250152588, 1.0254042148590088, 1.4843114614486694, -1.8524441719055176, 0.1397705078125, -3.7931315898895264, 0.2270643413066864, 0.7606608271598816, 2.247607707977295, 0.4585832953453064, -0.5962727665901184, -0.1869252473115921, 1.3685709238052368, 0.5710991621017456, -1.6016777753829956, 1.3872952461242676, -3.0266504287719727, 1.0439995527267456, -0.1124403178691864, -0.8586256504058838, -0.4480522871017456, -1.6007826328277588, 1.8012644052505493, 0.2622002363204956, -0.2875739336013794, -0.8512912392616272, 0.2098931223154068, 2.1317241191864014, 2.5503201484680176, -1.1723496913909912, 1.6929457187652588, 1.4704759120941162, 3.12851619720459, -0.7909919023513794, -1.1676058769226074, -0.5112338662147522, -2.5379300117492676, -1.20381498336792, 0.8941175937652588, 3.8371853828430176, -0.3603244423866272, -0.4142184853553772, 0.74365234375, 0.5666978359222412, -0.8740531206130981, 1.6616346836090088, 2.4688992500305176, 0.574397623538971, -0.004681057296693325, 2.202981472015381, 0.2571817934513092, 2.4009737968444824, 0.1581064909696579, -0.2395562082529068, 0.3620537519454956, 0.874908447265625, -0.3724568784236908, 0.1079847514629364, 0.1945563405752182, 1.0218167304992676, 0.91229248046875, 0.3852165937423706, 1.5121798515319824, 1.8730332851409912, -1.2325778007507324, -2.4722018241882324, -3.919935464859009, 0.1191134974360466, -1.8142632246017456, -0.4894951581954956, -0.3845486044883728, -1.4070731401443481, -0.47095954418182373, -1.2878960371017456, -0.6476779580116272, 0.3518947958946228, 1.0724825859069824, 0.0979173481464386, -0.5725318193435669, -0.670806884765625, 1.0543212890625, 2.5949435234069824, -0.7676052451133728, 3.30678129196167, -0.8672756552696228, -0.6477797031402588, 0.7102118730545044, 0.6908340454101562, 0.5894486904144287, -3.489044189453125, -0.0066697862930595875, -0.2698160707950592, 0.5732964277267456, 0.8183491826057434, 1.5005459785461426, 1.0252617597579956, 1.112701416015625, 0.9006178379058838, 4.00994348526001, 1.8859422206878662, 0.5424126386642456, 0.4679497480392456, -0.5050421953201294, 1.2258096933364868, 2.56911039352417, 0.1908230185508728, -0.1034088134765625, 1.2784932851791382, -0.9524468183517456, 3.4726223945617676, -1.4394192695617676, -0.7915988564491272, 3.3308377265930176, 1.8231337070465088, -1.4104139804840088, -0.6016048789024353, -2.461615562438965, -1.1472821235656738, 0.0478007011115551, 0.013904147781431675, -0.2822435200214386, 0.3656243085861206, 1.8426309823989868, -0.686405599117279, -0.02129448764026165, -3.0664875507354736, 0.7497931718826294, 0.9254116415977478, 2.1347248554229736, 0.5246446132659912, 0.31866201758384705, -2.609307289123535, -2.554144859313965, 0.5753512978553772, 0.7244347333908081, -0.125, -2.2466633319854736, 1.3681640625, 1.488728404045105, 0.2509663999080658, -1.5935126543045044, 3.852869749069214, -1.8991427421569824, 0.7623189091682434, 0.6529337763786316, -1.8255953788757324, -3.073296546936035, -1.7481621503829956, 4.290332317352295, -1.3495652675628662, 0.7963337302207947, -2.6167399883270264, -1.3538581132888794, -0.35491943359375, -1.7945284843444824, 0.07337697595357895, 3.7690396308898926, -0.9167209267616272, -0.5816786289215088, 0.8892737627029419, -0.0022667779121547937, 0.8159450888633728, 0.0327012799680233, -1.1756523847579956, -0.8521855473518372, -1.7455850839614868, 1.8977457284927368, -0.8718668818473816, 1.0496419668197632, 0.4346466064453125, -1.4677734375, 0.4542575478553772, -2.2600369453430176, -0.2817925214767456, 2.3523356914520264, 0.07716623693704605, 2.156827211380005, -1.1242607831954956, -0.2305772602558136, -1.4251267910003662, 0.7938978672027588, 0.9551560878753662, -2.2896320819854736, 3.104078531265259, -1.9329766035079956, -1.5999178886413574, -2.1958415508270264, 2.3499722480773926, 1.4142591953277588, 3.775200843811035, 1.4991116523742676, -0.6804673671722412, -1.0068631172180176, -1.5204603672027588, 0.1581081748008728, -0.9082099199295044, -0.9609103798866272, -0.4741482138633728, 2.441873788833618, -1.3248121738433838, 0.8348185420036316, -0.8590901494026184, 0.8032497763633728, -0.2016940712928772, -1.6931694746017456, 0.4415249228477478, 0.4952596127986908, 1.1256442070007324, -0.3330722451210022, -1.7861328125, -0.4933810830116272, 2.952362060546875, -1.038765788078308, -1.1256866455078125, -0.9841410517692566, -1.3535834550857544, 2.971235513687134, -0.7173122763633728, -2.705824136734009, -1.4344820976257324, 0.2661064863204956, 0.1657036691904068, 2.8187646865844727, -0.8383246660232544, -0.19453726708889008, -0.7939453125, 0.7491179704666138, 1.2442762851715088, -0.9971889853477478, 0.3064066469669342, -2.1319003105163574, 0.04638671875, 0.7960951328277588, 1.3723177909851074, -2.006035804748535, -4.149187088012695, 1.0135769844055176, -1.0368856191635132, -1.1359049081802368, -0.1758015900850296, 0.32385846972465515, 0.3445146381855011, 1.409698486328125, -0.1366848349571228, 1.1757032871246338, -0.5791286826133728, -1.38632333278656, 0.7140434980392456, 0.4763217568397522, -1.5357271432876587, -3.602281332015991, 1.6221890449523926, -1.6406216621398926, 0.08541742712259293, 1.8460845947265625, 0.6755574345588684, 0.0583631731569767, 2.751146078109741, -1.5132107734680176, 1.0427076816558838, -1.10888671875, -0.9944254755973816, -2.137068033218384, -0.5800917148590088, 3.40938138961792, 2.471021890640259, -0.9987691044807434, 0.2338934987783432, -0.1433308869600296, 1.5685086250305176, 3.5919461250305176, -2.9889135360717773, -1.3930528163909912, 0.2593214213848114, -1.2352566719055176, 0.3504367470741272, -2.4234211444854736, 1.0292562246322632, -0.7315537929534912, -0.1131388321518898, -0.9566760659217834, 1.4694170951843262, 0.5948113203048706, 0.0142686627805233, -1.1797689199447632, -2.0939745903015137, -0.2179463654756546, -0.483612060546875, 0.7648383378982544, 1.2078958749771118, -1.6873880624771118, 3.7898967266082764, -0.5251328945159912, -1.3235337734222412, -0.015372170135378838, 2.375678062438965, -1.5157877206802368, -0.4190877377986908, 2.465888023376465, 1.2515767812728882, -3.45621395111084, -3.312852621078491, 0.1872914582490921, 4.186435222625732, 1.6464470624923706, 1.0808682441711426, 3.030381917953491, 1.2503662109375, 2.6579318046569824, -2.108696937561035, 0.3108541667461395, 1.9004042148590088, 0.0207689069211483, 0.7701907753944397, 2.171222686767578, -0.9366828203201294, 0.7604438066482544, 1.3034329414367676, 0.4090576171875, -0.4856330156326294, -0.48543548583984375, 0.7026197910308838, -0.6062893271446228, 0.5228712558746338, 1.3460421562194824, -2.085761070251465, -1.1868150234222412, 1.3032633066177368, 2.0190021991729736, 0.2186686247587204, -0.3150838315486908, -0.3395487368106842, -0.6587117314338684, 1.0967916250228882, 0.5294918417930603, 0.1038123220205307, 0.5358818769454956, -3.76104736328125, -1.6599935293197632, 1.215767741203308, 0.0557183176279068, -1.4545694589614868, 1.2853622436523438, 2.7886996269226074, -1.1983304023742676, -1.2400716543197632, 1.1773139238357544, 1.4457296133041382, -1.0095418691635132, 0.2553914487361908, -0.1520250141620636, -0.23760986328125, -0.5849880576133728, -1.4733123779296875, 0.3112775981426239, -1.0315619707107544, 0.2305637001991272, -0.1398959755897522, 2.1186861991882324, -0.7275195717811584, -0.0374925397336483, -0.3953382670879364, 1.8350287675857544, 3.4497485160827637, 0.0802205428481102, 0.4171006977558136, 0.19492551684379578, -0.4120144248008728, 1.7565714120864868, -0.07916513830423355, -0.3941277265548706, 0.0867513045668602, 0.8791843056678772, 0.2788899838924408, -1.3582967519760132, -0.5290171504020691, 1.4628770351409912, 0.2245822548866272, -0.8321397304534912, -0.1496632844209671, -1.810872197151184, 1.498504638671875, 1.0033094882965088, 1.2651095390319824, -0.3566657304763794, 0.6297810673713684, -0.5276421308517456, 0.3249036967754364, -0.0903099924325943, -1.3753933906555176, 1.7325981855392456, 1.1354010105133057, -0.6734432578086853, -1.3598700761795044, 2.3052210807800293, 0.3992784321308136, -0.284820556640625, 0.7263115644454956, -0.4090440571308136, -0.3409322202205658, 0.6351115107536316, -0.3946126401424408, -0.9651760458946228, -0.0431993268430233, -1.798205852508545, -3.923475503921509, -1.0262775421142578, -0.20244428515434265, 0.898433268070221, 0.9480692744255066, -1.2605658769607544, 1.6910604238510132, 0.0678236186504364, 2.042898416519165, -0.2906985878944397, -3.986748695373535, 0.00311279296875, -0.1051093190908432, -0.23488786816596985, 0.704345703125, 0.1353420615196228, -1.7571563720703125, 0.9395073652267456, -2.3313801288604736, -0.479888916015625, -1.284088134765625, 0.8737589716911316, -2.589246988296509, 0.3407694399356842, 1.1984931230545044, -2.005262613296509, 0.3899634778499603, -4.241116046905518, 2.102020263671875, 0.8473758697509766, -0.0948215052485466, -1.0196329355239868, -1.6535238027572632, -1.4735344648361206, -0.3427395224571228, 0.3629913330078125, -1.5417073965072632, -3.1533610820770264, 0.4688194990158081, -2.3197293281555176, 0.8744608759880066, 0.0785692036151886, 1.2339884042739868, -0.9078009128570557, 1.1501973867416382, 0.3844129741191864, -1.2861124277114868, -0.8714430332183838, 1.4201117753982544, -4.59327507019043, 1.1179910898208618, 2.279893636703491, 0.1945563405752182, 1.4206610918045044, -1.4012925624847412, -1.2416754961013794, -0.3263685405254364, -3.03334903717041, -1.3994954824447632, -0.8789901733398438, 2.531304359436035, 0.1103447824716568, 0.7963460087776184, -0.7394578456878662, -3.841627359390259, -1.9945340156555176, 1.7402106523513794, -1.7240091562271118, -0.3012356162071228, -1.8927866220474243, 1.7463243007659912, 0.2585822343826294, -0.5654568076133728, 0.6098564863204956, -1.2265470027923584, 0.1200120747089386, 0.4673919677734375, -1.0067239999771118, -3.960035562515259, -0.5826449990272522, -2.3954365253448486, 0.13124677538871765, 0.4208509624004364, 0.3705783486366272, -0.1557074636220932, 0.3923238217830658, 1.1970571279525757, -0.1694963276386261, -0.4246894121170044, 0.1195000559091568, -1.16841721534729, -0.9392030239105225, 0.4901394248008728, -2.1632282733917236, 1.2599215507507324, 2.1859469413757324, 0.85296630859375, 2.86440372467041, -1.6725802421569824, -0.4578721821308136, 1.1315239667892456, -2.489027261734009, 2.090576171875, 1.6769205331802368, 0.2607048749923706, 0.7998530268669128, 0.007098727859556675, 2.445509910583496, 1.1123589277267456, -1.775656819343567, -1.7795681953430176, 0.2610948383808136, 3.817979574203491, 3.6727702617645264, -1.6200968027114868, 0.31322818994522095, -1.2986382246017456, 1.840179443359375, 1.5378960371017456, -1.8078477382659912, 0.2485283762216568, -1.1782437562942505, 0.1732075959444046, -5.040079593658447, -1.3752340078353882, -2.9235026836395264, 0.40216064453125, -0.926605224609375, -0.6898689270019531, -1.76472806930542, -0.06810739636421204, -0.913568913936615, -0.3288133442401886, 1.7261691093444824, 1.1755506992340088, 0.1383124440908432, -0.6887614130973816, -0.9951375126838684, 1.067639708518982, 0.2583482563495636, -0.18478435277938843, -0.3215552568435669, 0.1941172331571579, -0.0019925434608012438, 1.0159912109375, -1.0520316362380981, 0.9906718134880066, -1.4173922538757324, -0.9715542197227478, -2.6230196952819824, 1.12225341796875, -2.428358316421509, 0.34107378125190735, -0.1524505615234375, 1.360565185546875, -0.3959689736366272, 0.2775861918926239, 2.407823324203491, 0.5609673261642456, 1.9203932285308838, 0.4463704526424408, 0.7297685146331787, 1.4400430917739868, 0.2917073667049408, 5.10853385925293, 0.8379042148590088, 0.20968246459960938, 0.2560831606388092, 0.6580810546875, -0.02846611849963665, -1.209259033203125, -0.1585964560508728, 2.8361520767211914, -0.8009507656097412, 0.9684922695159912, 0.5502048134803772, 2.0887908935546875, -1.810791015625, 0.7510265707969666, 0.5009257197380066, -0.2293226420879364, 0.2072923481464386, -1.0057644844055176, -8.18516731262207, -0.6908433437347412, 1.0884331464767456, -1.0633951425552368, -3.720062255859375, 1.694480061531067, -0.05167579650878906, 1.3367037773132324, 0.4647081196308136, 2.1602511405944824, -2.0546536445617676, 0.6064181923866272, 2.073981285095215, 0.1015760600566864, -0.1395314484834671, 1.3551839590072632, 3.8497891426086426, 1.7572190761566162, -3.426215171813965, -0.7185770869255066, -0.2045169472694397, -2.158521890640259, 3.5869412422180176, -1.4792531728744507, -0.1871134489774704, 1.9163072109222412, 0.6905686855316162, 1.1113417148590088, 0.4786851704120636, 3.4951443672180176, 0.2946760356426239, 1.6913858652114868, 1.4617342948913574, -0.60302734375, 2.4426541328430176, 1.3786756992340088, -1.1716570854187012, -1.594207763671875, 0.32940974831581116, -1.215699315071106, -1.6534898281097412, -1.313300609588623, 2.887193441390991, 0.5499267578125, 0.7662827968597412, 0.4410129189491272, 0.0938059464097023, 1.1896430253982544, 1.1975996494293213, -0.6014785766601562, -0.2815755307674408, -3.51092529296875, 0.7727729082107544, -0.8961164951324463, 0.5975104570388794, -0.3226047158241272, -0.9911838173866272, -1.7938169240951538, 0.9377983808517456, -3.9847819805145264, -2.456787109375, 1.3528848886489868, -2.35557222366333, 0.0584309883415699, 2.5046184062957764, -2.2450764179229736, -0.1359456330537796, 1.5126546621322632, 1.204803466796875, -1.8333638906478882, 1.7796978950500488, -1.4259812831878662, 4.672512531280518, 1.5900132656097412, -0.7832505702972412, -1.7309706211090088, 2.040944814682007, 0.6400146484375, 0.4176839292049408, -2.4601237773895264, -0.2174241840839386, -1.0067070722579956, -1.5976274013519287, -1.1303778886795044, -0.2530602216720581, 0.6046142578125, 0.1785481721162796, 0.16815185546875, 0.50921630859375, 0.7758687138557434, 0.03818151727318764, -1.7783541679382324, 1.2767876386642456, -0.7027719020843506, -0.0469021275639534, 1.2858480215072632, -0.3218994140625, 0.1039089635014534, -1.79198157787323, 2.1807665824890137, -0.7565850019454956, -1.4867790937423706, -2.9344890117645264, -2.06634521484375, -0.04415957257151604, 3.2054035663604736, 1.7374335527420044, -0.6495700478553772, -0.3745252788066864, -1.4959444999694824, 0.018372854217886925, 0.5663994550704956, 2.9210867881774902, -0.1086697056889534, -1.6532864570617676, -0.2620137631893158, -2.193188190460205, -0.6975911259651184, 0.4597879946231842, -1.0227423906326294, 0.4394870400428772, 0.9411642551422119, 0.6523250937461853, 1.3902316093444824, 1.9934624433517456, 0.1219414621591568, -1.72236967086792, -1.2179056406021118, 0.8144565224647522, 1.7250341176986694, 0.31028494238853455, 0.5405476689338684, 0.2756415605545044, -0.2586788535118103, 1.6424899101257324, 0.9687220454216003, 2.5180461406707764, -0.1513637900352478, 0.7615559697151184, -0.2868075966835022, -1.421174168586731, 0.8554958701133728, 0.7528415322303772, -0.2651011049747467, -0.2967630922794342, 1.57373046875, 0.854248046875, 1.2554593086242676, -0.4173448383808136, -0.0914510115981102, 1.7106527090072632, -0.11372799426317215, 1.0004476308822632, -4.392330646514893, -1.2142478227615356, 0.0332438163459301, 0.2199232280254364, 0.0197889544069767, -3.1911168098449707, 1.1175299882888794, -1.5770975351333618, 2.17378568649292, 2.4411916732788086, 0.4832475483417511, 0.0436621755361557, 1.0728996992111206, 1.2389730215072632, -1.0681830644607544, 0.4025675356388092, -1.4319491386413574, -0.2496337890625, 0.9699164628982544, -0.2698822021484375, 3.103692054748535, -0.6435546875, 0.6817169189453125, -0.6337890625, -1.4064127206802368, 0.7756618857383728, 2.34014892578125, 1.8304104804992676, 0.93389892578125, -0.8915879726409912, -2.437554359436035, -0.0955284982919693, 3.5851101875305176, -0.27374351024627686, 2.4104411602020264, 0.3925577700138092, 2.599677085876465, -0.28872743248939514, 0.27701568603515625, 1.5762397050857544, -1.8708902597427368, -0.0810139998793602, 1.5694715976715088, 0.5630832314491272, 1.3797743320465088, 0.3004336953163147, 1.1838792562484741, -0.4693230390548706, 0.1068318709731102, 2.974663734436035, -1.9452446699142456, 4.330179691314697, 2.6550700664520264, -0.2885538637638092, 0.9309103488922119, 1.4848123788833618, -0.3055962324142456, 0.2762451171875, 0.2953016459941864, -0.5180231928825378, 1.1069403886795044, -1.8148515224456787, -1.5303988456726074, -0.10884051769971848, 2.881903648376465, 0.1561228483915329, -1.1421610116958618, 0.131805419921875, 0.74639892578125, -0.7392340898513794, 1.2037489414215088, -1.2019754648208618, -1.4083794355392456, -0.6334974765777588, 0.7630615234375, 1.5175204277038574, 1.440673828125, -2.902099609375, 5.290900230407715, -1.4730851650238037, -0.3558892011642456, -0.2028028666973114, -0.002315944992005825, 1.1858994960784912, -0.2043423056602478, -0.1453789621591568, 2.9987995624542236, -0.01317681185901165, 0.6052381992340088, 0.5020056962966919, -1.2075331211090088, -2.241888999938965, -1.5849881172180176, 0.8564317226409912, -0.4859110414981842, 1.4280191659927368, 0.9113803505897522, 2.5626323223114014, -2.032362222671509, -0.3895416259765625, 1.7879605293273926, 1.7961221933364868, -0.3587782084941864, -2.101752281188965, -1.5102572441101074, -0.03064388781785965, -0.5800931453704834, 1.115344524383545, 0.7350090742111206, 1.8492703437805176, -0.1125623881816864, 0.19158935546875, -0.2119242399930954, -0.2694057822227478, 1.3142666816711426, 3.1209309101104736, 1.5306429862976074, -1.4948052167892456, -2.154920816421509, -1.0870767831802368, 0.04728126525878906, 2.0321044921875, 2.16796875, -0.2418178915977478, -3.285142660140991, -0.2531026303768158, 0.2434421181678772, -2.514885902404785, 0.2149912565946579, -1.5206952095031738, 0.3201429545879364, 2.9341228008270264, 1.890228271484375, -1.7598741054534912, -1.4828152656555176, -2.5495028495788574, 1.7918294668197632, -2.390374183654785, -0.0687374547123909, 0.799072265625, 0.4552001953125, -0.6430189609527588, 1.2558321952819824, -2.908447265625, 2.7273051738739014, -4.597927570343018, 0.9789106845855713, -1.4069124460220337, -2.262864828109741, 1.1305270195007324, 0.3892822265625, -0.11110348254442215, -0.8091477155685425, 1.6747775077819824, 2.7599284648895264, 0.37823486328125, 8.83083724975586, 2.6859943866729736, 2.3493924140930176, -0.8406270146369934, -2.0945959091186523, -2.4050021171569824, 0.1329311728477478, -0.5776350498199463, -0.7709079384803772, -1.0353461503982544, -0.2240380197763443, -1.6968247890472412, 0.4657796323299408, 1.2173123359680176, -0.8174336552619934, 0.4154052734375, -2.7881977558135986, -0.4764133095741272, 1.1536903381347656, 0.9328410029411316, -1.7339951992034912, -0.4619038999080658, 0.5260310769081116, -1.4978231191635132, 1.6069666147232056, -1.8175320625305176, -0.5842013955116272, -3.2947239875793457, -1.0112863779067993, -0.0701412633061409, 0.4697333574295044, 0.99609375, -0.0340203195810318, 0.1394449919462204, 0.6865742802619934, -0.5958116054534912, -0.46635520458221436, -1.3399386405944824, -0.6067878007888794, 1.0662027597427368, 0.6063571572303772, -2.0231525897979736, -0.1551717072725296, 0.4118313193321228, 0.6663275957107544, -0.15861892700195312, -1.2704291343688965, 1.2425740957260132, -1.01080322265625, 2.0846829414367676, 1.4724061489105225, -0.0025702582206577063, 0.0703803151845932, 1.177176594734192, 0.757843017578125, 1.0827704668045044, -0.3216281533241272, -2.092667579650879, 0.4678276777267456, 1.2326185703277588, 0.3792995810508728, 4.219536781311035, 0.6168009638786316, -0.0910305455327034, -0.0471157506108284, -0.1838853657245636, -0.3408915102481842, 1.9056802988052368, 2.5918917655944824, -1.83203125, 1.909912109375, 1.3116319179534912, 1.6914079189300537, -3.206712007522583, -1.5381808280944824, 1.97589111328125, -1.6179300546646118, -0.0387624092400074, -0.06530274450778961, -2.1944172382354736, 1.4020113945007324, 2.0938007831573486, 0.5608181357383728, -0.6254340410232544, -1.1171603202819824, 0.7729220986366272, -0.6057332158088684, -0.8200187683105469, -0.546142578125, 1.0483728647232056, 1.826093077659607, -0.6060417890548706, -1.5542128086090088, -0.4455159604549408, -4.019643306732178, -0.5032823085784912, 1.8781806230545044, 2.1644694805145264, -2.44303297996521, 1.2540961503982544, 3.284196615219116, 1.3545464277267456, -3.214715003967285, 1.9563666582107544, -0.0429416224360466, -0.3484870195388794, 0.5668979287147522, 0.1670905202627182, 0.3591969907283783, 0.6537975668907166, 2.074449300765991, 2.950371742248535, -2.8445444107055664, 1.3306070566177368, 2.6319003105163574, -0.2222764790058136, 2.470933675765991, 0.7920125126838684, -0.1701117604970932, -2.180375814437866, -1.3125814199447632, 2.7000324726104736, 0.3193393349647522, -2.4486491680145264, 1.7996114492416382, -1.7538825273513794, 0.2948777973651886, 0.0983903706073761, -0.3770243227481842, -1.1264106035232544, 2.7327661514282227, -2.51870059967041, -0.4196065366268158, -0.1638454794883728, -0.5559828281402588, -0.8535902500152588, -0.9950663447380066, -0.5060340166091919, 0.4847886860370636, -0.058066897094249725, 1.0458543300628662, 0.2547607421875, -0.9325900673866272, 0.1766984760761261, -1.2087724208831787, 2.7828776836395264, -0.4900037944316864, 1.398937702178955, -0.3588121235370636, 0.0538058802485466, -1.1581352949142456, -2.150160074234009, -2.7776691913604736, -1.772611141204834, 1.5634629726409912, -1.7998182773590088, -0.1794976145029068, -0.5503031611442566, -0.5064833164215088, 0.5993516445159912, -1.3365206718444824, 2.81854248046875, 0.5827467441558838, -0.3042398989200592, -0.2540211081504822, 2.225721597671509, 0.6122538447380066, 0.8979017734527588, 0.1246473491191864, -1.2538248300552368, 0.2467990517616272, -0.3544328510761261, -0.16544808447360992, 0.1299082487821579, 0.5114644169807434, -2.0777587890625, 1.8395453691482544, 1.0867513418197632, 0.01729329489171505, 0.5799831748008728, 0.0706431046128273, 1.173697590827942, 0.9420064091682434, -0.3988105058670044, 0.9974128007888794, -1.9475860595703125, 0.2651231586933136, -0.2703315019607544, -0.7079806923866272, -0.2960679829120636, 0.8024758100509644, -1.459747314453125, 0.36878883838653564, 1.3374429941177368, -1.930908203125, 1.9471163749694824, 0.3224080502986908, 0.0365024134516716, -0.6594611406326294, -1.0536702871322632, 0.2349446564912796, -2.7292115688323975, -1.7168104648590088, -1.8137332201004028, 0.3910929262638092, -0.7339884638786316, -2.097357749938965, -0.2143079936504364, -0.0500912144780159, 0.363983154296875, 2.08451247215271, -0.9440256953239441, 0.6414416432380676, -2.279161214828491, 0.1502753347158432, -1.9708930253982544, 0.1485222727060318, -1.1397840976715088, 2.6200358867645264, 2.055772542953491, 0.0473531074821949, -3.5022244453430176, 3.5600924491882324, -2.001234292984009, 2.173126697540283, 0.2378438264131546, -1.5676947832107544, -3.0108745098114014, 1.28057861328125, -1.3680216073989868, 3.301520347595215, 0.0933295339345932, 1.7659097909927368, -1.631731629371643, 0.5587700605392456, -2.460313081741333, 0.0904371440410614, 1.7297159433364868, 0.4097663164138794, -1.1165364980697632, 0.6181979775428772, 3.91402268409729, -0.2849324643611908, -1.0483109951019287, 2.1478984355926514, -0.8914862871170044, 0.4892951250076294, -3.286327838897705, 0.01872762106359005, 0.1257053017616272, 0.3973388671875, 1.6538764238357544, 0.5526072382926941, 0.8259141445159912, 1.0095316171646118, -0.8808254599571228, -0.5193210244178772, 1.8377490043640137, -0.3476528525352478, -1.6779649257659912, 1.6423780918121338, 1.2734408378601074, -1.22300124168396, -1.14174485206604, -0.44890254735946655, -0.195917546749115, 1.63814115524292, -0.5228949785232544, 0.9337497353553772, -0.66766357421875, 1.2541978359222412, -2.649217367172241, 0.6359134316444397, 3.7202486991882324, 1.116778016090393, -0.99462890625, 0.9961683750152588, 0.1235165074467659, 1.0683321952819824, -1.092254638671875, 3.048633098602295, 1.1873983144760132, -0.8792216181755066, 1.0009223222732544, -0.5894978642463684, -2.3731689453125, -1.479859709739685, 3.8871662616729736, 1.8213365077972412, -0.3162570595741272, 0.07880327105522156, 0.7277442216873169, 0.8978525996208191, 0.1036105677485466, 0.3321058452129364, 0.4368692934513092, 1.2897237539291382, -0.2827826738357544, 0.1040412038564682, 0.7722371220588684, 1.3295491933822632, 3.3097872734069824, -0.1246541365981102, -0.3261888325214386, 0.4579399824142456, -1.1077609062194824, -1.6217989921569824, -0.5510720014572144, 0.0042470297776162624, -0.1633978933095932, -1.5049370527267456, 0.4139404296875, -0.5795016884803772, -0.3971945345401764, 2.944269895553589, -1.3177151679992676, -2.7427775859832764, -1.4899444580078125, 2.06351900100708, -0.8831040859222412, -1.6949462890625, -0.9351942539215088, 0.3542412519454956, -0.2634684145450592, -1.6310763359069824, -0.3096788227558136, 1.5128012895584106, -1.826751708984375, 1.0221761465072632, -3.326849937438965, 1.7821180820465088, 1.164328694343567, -2.249091148376465, -1.7907731533050537, 2.340104818344116, -1.0793143510818481, 0.938446044921875, -1.8152533769607544, -2.151421546936035, -0.4098646342754364, 0.772705078125, -0.4294196367263794, 2.044325113296509, -0.0500691719353199, 0.0516272634267807, 1.9138526916503906, 0.2809312641620636, -0.40102046728134155, 2.506483316421509, 1.8649088144302368, 1.2125295400619507, -0.4440358579158783, -0.2623613178730011, -1.546530842781067, -0.8820597529411316, 2.769483804702759, 1.2491455078125, -0.7924110889434814, 0.4225921630859375, 0.0701497420668602, 1.8285115957260132, -0.4451531171798706, 1.6170111894607544, -2.799553871154785, -2.0733134746551514, 2.03250789642334, 2.14306640625, -0.2628139853477478, 1.4502427577972412, 0.5184597373008728, 1.2967842817306519, -0.7492438554763794, -1.111968994140625, 2.3043620586395264, -0.3317803144454956, 4.218058109283447, -0.6964908242225647, 0.10723505914211273, -2.4910480976104736, -0.9770891666412354, 0.1035139262676239, -5.153754234313965, -1.1666818857192993, 1.3430854082107544, 0.2940402626991272, 0.2390543669462204, -2.0742154121398926, 2.822862386703491, 1.3868001699447632, 0.75494384765625, -2.8632404804229736, -0.340790331363678, 1.923583984375, -0.7499321699142456, -1.5458465814590454, 1.9276055097579956, -0.0314602330327034, 1.1130303144454956, 0.4771830141544342, -1.7245279550552368, 1.9656813144683838, 0.5963847041130066, 0.8753933310508728, -1.2667100429534912, -1.2905679941177368, 0.1132609024643898, -0.1531982421875, 0.2185872346162796, -0.8039432168006897, -0.3910437822341919, -1.4864637851715088, 0.8198445439338684, 2.8455402851104736, -0.1614338606595993, 2.874091148376465, 2.056749105453491, -2.0170881748199463, -1.7856581211090088, 0.2682766318321228, 0.2578125, 1.1351350545883179, -1.7831759452819824, -0.4884270429611206, -2.243299722671509, 0.8185763955116272, -0.013905842788517475, -0.6292216181755066, -0.0377129465341568, 2.0079548358917236, -0.0207383893430233, 0.8748202919960022, -4.72783088684082, -1.1784939765930176, 2.9331562519073486, -1.0175882577896118, 0.6747572422027588, -1.034533977508545, 0.7650824785232544, -1.9311624765396118, -1.3972744941711426, 2.8617842197418213, 3.483954429626465, 1.1059298515319824, -1.969443440437317, -0.7884080410003662, -0.93857342004776, -0.4936998188495636, 1.075542688369751, -1.892406940460205, 1.6456502676010132, -1.0491604804992676, 1.1874051094055176, -0.2978617250919342, -0.8617197871208191, 0.1334669291973114, 1.0204789638519287, 0.7332221269607544, -1.1464911699295044, 1.2704535722732544, -1.4107292890548706, -0.3347303569316864, -0.7632988691329956, -5.370090961456299, -3.260918617248535, 2.616943359375, 2.959235191345215, 1.3723423480987549, -1.0164862871170044, 1.4074537754058838, 2.819688558578491, 0.5335010886192322, -1.7260335683822632, -1.5888603925704956, -1.3067355155944824, -0.1479915976524353, 0.0935465469956398, -0.0932278111577034, 1.1661783456802368, -2.061394691467285, 1.1672635078430176, 0.4668647050857544, 0.02490912564098835, 0.8680080771446228, 3.271104574203491, 0.8791877031326294, 1.5764702558517456, -0.4960496723651886, 0.7722201943397522, 0.0002851767640095204, 0.2597927451133728, 0.2585042417049408, 1.5334608554840088, 0.8030616044998169, 1.0696275234222412, 1.1155428886413574, 0.5225305557250977, -0.4424406588077545, 0.2494574636220932, 0.0796949565410614, -0.3503146767616272, 0.2304348349571228, 0.5588514804840088, -0.6768391728401184, 3.328369140625, -0.5502658486366272, 1.0304633378982544, -3.297149658203125, -2.0646564960479736, 0.3407931923866272, 1.419628620147705, -1.4453803300857544, 0.0407680943608284, -1.228035807609558, -0.3352796733379364, 1.7523871660232544, -0.8111504316329956, 0.5019938349723816, -1.1350233554840088, -2.5541720390319824, 0.3181016743183136, -0.9143880009651184, -2.4672443866729736, -1.8321499824523926, 3.844618082046509, -1.4581705331802368, 0.545318603515625, 1.1845160722732544, -0.7692328691482544, -0.0336642786860466, 1.5218505859375, 2.1111247539520264, 0.5111418962478638, 0.1744418740272522, -0.6559237241744995, -1.6904975175857544, -2.5592448711395264, -0.1517401784658432, -0.8882480263710022, -1.3846536874771118, -0.692962646484375, -1.8413221836090088, -0.8163723349571228, 1.3683844804763794, 1.0643174648284912, 0.8384670615196228, -0.9227955937385559, -0.3602159321308136, -1.7865939140319824, 1.9877657890319824, -1.7818883657455444, -0.3254190981388092, -0.259552001953125, 0.8744303584098816, -1.7277289628982544, 3.308485269546509, 1.7214423418045044, 2.547003746032715, 0.7358500361442566, 0.405853271484375, 0.621845006942749, -3.384345054626465, 0.4016282856464386, -0.9128825068473816, -1.2768690586090088, -0.41993629932403564, -1.355560302734375, -1.8345794677734375, -0.1613922119140625, -0.7580269575119019, 0.5150417685508728, 1.6379190683364868, -0.31816524267196655, 0.3461168110370636, 0.7934163212776184, -1.054242491722107, -1.1216362714767456, -0.2607099711894989, -0.2951151430606842, 0.2372913360595703, -0.9506632685661316, 0.47015127539634705, 1.4920010566711426, -0.4529893696308136, 4.03132438659668, -0.6938002109527588, -2.577223062515259, 0.6017218828201294, -2.7851552963256836, 2.9399685859680176, -1.0214369297027588, 1.4286177158355713, -0.3066881000995636, 1.0089315176010132, -1.3526068925857544]\n"
     ]
    }
   ],
   "source": [
    "from langchain_community.embeddings import DashScopeEmbeddings\n",
    "embeddings = DashScopeEmbeddings(dashscope_api_key=os.getenv(\"API_KEY\"),model=\"text-embedding-v1\",)\n",
    "text = \"This is a test query.\"\n",
    "query_result = embeddings.embed_query(text)\n",
    "print(query_result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "8ebdc08f-6544-4403-99d1-f51faecb6d35",
   "metadata": {},
   "outputs": [],
   "source": [
    "import faiss\n",
    "from langchain_community.vectorstores import FAISS\n",
    "from langchain.text_splitter import RecursiveCharacterTextSplitter\n",
    "text_splitter = RecursiveCharacterTextSplitter()\n",
    "documents = text_splitter.split_documents(docs)\n",
    "vector = FAISS.from_documents(documents, embeddings)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "4fbf66e4-7b09-468f-b005-96175d944e17",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain.chains.combine_documents import create_stuff_documents_chain\n",
    "from langchain_core.prompts import ChatPromptTemplate\n",
    "prompt = ChatPromptTemplate([\"\"\"Answer the following question based only on the provided context:\n",
    "\n",
    "<context>\n",
    "{context}\n",
    "</context>\n",
    "\n",
    "Question: {input}\"\"\"])\n",
    "\n",
    "document_chain = create_stuff_documents_chain(llm, prompt)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "14d0c862-c061-4ccc-b3b6-7dbb3a616b7e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain.chains import create_retrieval_chain\n",
    "retriever = vector.as_retriever()\n",
    "retrieval_chain = create_retrieval_chain(retriever, document_chain)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "5605335b-dc98-41f5-a8c3-b9db3798ff71",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The Sora model is a large-scale, text-conditional diffusion model trained on video and image data of variable durations, resolutions, and aspect ratios. It uses a transformer architecture operating on spacetime patches of video and image latent codes. Sora is capable of generating high-fidelity videos of up to a minute in length, as well as handling various input formats such as images, pre-existing videos, and text prompts. With its flexible sampling capabilities, Sora can generate content for different devices, aspect ratios, and perform tasks like image and video editing, animation, and video-to-video transitions. Additionally, Sora demonstrates emerging simulation capabilities, including 3D consistency, long-range coherence, and interaction with the world, although it still has limitations as a simulator.\n"
     ]
    }
   ],
   "source": [
    "response = retrieval_chain.invoke({\"input\": \"What is the Sora model?\"})\n",
    "print(response[\"answer\"])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "367b6df3-5b22-4a8c-b9b3-9b560fd23b7c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "name='Sora' description='Search for information about Sora. For any questions about Sora, you must use this tool!' args_schema=<class 'langchain_core.tools.retriever.RetrieverInput'> func=functools.partial(<function _get_relevant_documents at 0x000001FD73BB6B60>, retriever=VectorStoreRetriever(tags=['FAISS', 'DashScopeEmbeddings'], vectorstore=<langchain_community.vectorstores.faiss.FAISS object at 0x000001FD776A90D0>), document_prompt=PromptTemplate(input_variables=['page_content'], template='{page_content}'), document_separator='\\n\\n') coroutine=functools.partial(<function _aget_relevant_documents at 0x000001FD73BB6E80>, retriever=VectorStoreRetriever(tags=['FAISS', 'DashScopeEmbeddings'], vectorstore=<langchain_community.vectorstores.faiss.FAISS object at 0x000001FD776A90D0>), document_prompt=PromptTemplate(input_variables=['page_content'], template='{page_content}'), document_separator='\\n\\n')\n"
     ]
    }
   ],
   "source": [
    "from langchain_core.tools import create_retriever_tool\n",
    "retriever_tool = create_retriever_tool(\n",
    "    retriever,\n",
    "    \"Sora\",\n",
    "    \"Search for information about Sora. For any questions about Sora, you must use this tool!\",\n",
    ")\n",
    "print(retriever_tool)\n",
    "tools = [retriever_tool]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "a0e24861-ba54-448c-b28f-ac46ebeff9d3",
   "metadata": {},
   "outputs": [],
   "source": [
    "from langchain_openai import ChatOpenAI\n",
    "from langchain import hub\n",
    "from langchain.agents import create_openai_functions_agent\n",
    "from langchain.agents import AgentExecutor\n",
    "prompt = hub.pull(\"hwchase17/openai-functions-agent\")\n",
    "agent = create_openai_functions_agent(llm, tools, prompt)\n",
    "agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "c20a5b6e-8414-4ad4-803a-0737753b3d89",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\n",
      "\u001b[1m> Entering new AgentExecutor chain...\u001b[0m\n",
      "\u001b[32;1m\u001b[1;3mI'm sorry, but I couldn't find any specific information on a \"Sora model\" in the context you're asking. It's possible that it might refer to a technology product or concept, a model in a particular field, or even a fictional character. If you could provide more details or clarify your question, I would be happy to try and help you with more accurate information.\u001b[0m\n",
      "\n",
      "\u001b[1m> Finished chain.\u001b[0m\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'input': 'What is the Sora model?',\n",
       " 'output': 'I\\'m sorry, but I couldn\\'t find any specific information on a \"Sora model\" in the context you\\'re asking. It\\'s possible that it might refer to a technology product or concept, a model in a particular field, or even a fictional character. If you could provide more details or clarify your question, I would be happy to try and help you with more accurate information.'}"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "agent_executor.invoke({\"input\": \"What is the Sora model?\"})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f0cdfec1-6201-4367-a3cc-ae8895825636",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "0adf0bd9-667c-4b62-9adf-861113ad464d",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
